; regionが選択されているかどうかを返す
(defun region-selected-p()
  (interactive)
  (condition-case err
      (progn (setq a (region-beginning)) t)
    (error nil)))

; 現在いる行の先頭へ行く
(defun goto-beginning-of-line()
  (interactive)
  (while (not (bolp))
    (backward-char)))

; 現在いる行の終端へ行く
(defun goto-end-of-line()
  (interactive)
  (while (not (eolp))
    (forward-char)))

; 1〜9かアルファベット文字かを返す       
(defun number-or-alphabet-char-p(char)
  (if (or
       (and (<= ?0 char) (>= ?9 char))
       (and (<= ?A char) (>= ?Z char))
       (and (<= ?a char) (>= ?z c))
       (and (<= 50000 char)))
      (list t)
    ()))

; 選択中領域の文字列を返す
(defun selected-region()
  (if (region-selected-p)
      (buffer-substring (region-beginning) (region-end))
    nil))

; 選択領域を解除
(defun unselect-region()
  (keyboard-quit))

(defun aaa()
  (interactive)
  (setq a (following-char))
  (message "%s" a))


(provide 'ichirokisanuki-libs)

